package base.components
{
	import flash.events.MouseEvent;
	
	import mx.containers.Panel;
	import mx.controls.Button;
	
	
	[Event(name="btnClickEvent",type="flash.events.MouseEvent")]
	public class UserMoneyPanel extends Panel
	{
		private var _dealBtn:Button;
		
		public function UserMoneyPanel()
		{
			super();
		}
		
		protected override function createChildren():void
		{
			super.createChildren();
			_dealBtn = new Button();
			_dealBtn.label = "批量";
			_dealBtn.addEventListener(MouseEvent.CLICK, onClick);
			this.rawChildren.addChild(_dealBtn);
			
		}
		
		protected override function layoutChrome(unscaledWidth:Number, unscaledHeight:Number):void
		{
			super.layoutChrome(unscaledWidth, unscaledHeight);
			_dealBtn.move(this.width - _dealBtn.width - 70, 6);
			_dealBtn.setActualSize(55,20);
		}
		
		private function onClick(e:MouseEvent):void
		{
			dispatchEvent(new MouseEvent("btnClickEvent"));
		}
		
		
	}
}